#pragma once
#include<stdio.h>
#include<assert.h>
#include<stdlib.h>
#include<errno.h>
typedef int DateType;
typedef struct Heap
{
	DateType* p;
	int size;
	int capacity;
}Heap;
void HeapInit(Heap*hp);
void HeapDestroy(Heap* hp);
void HeapPush(Heap* hp, DateType x);
void HeapPop(Heap* hp);
DateType HeapTop(Heap* hp);
bool HeapEmpty(Heap* hp);
void AdjustUp(DateType*p,int size);
void AdjustDown(DateType* p,int start,int size);